package com.gakj.truck.third.api.service;

import com.gakj.truck.third.api.mapper.TruckModelMapper;
import com.gakj.truck.third.core.domain.TruckModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by gc on 2016/5/25.
 */
@Service
public class TruckModelService {

    @Autowired
    TruckModelMapper modelMapper;

    public List<TruckModel> getByName(String name){
        return modelMapper.getByName(name);
    }

    public TruckModel getById(Integer id){
        return modelMapper.getById(id);
    }

    public List<TruckModel> getAll(){
        return modelMapper.getAll();
    }

    public void delete(Integer id){
        modelMapper.delete(id);
    }

    public void save(TruckModel truckModel){
        modelMapper.save(truckModel);
    }
}
